<?php
class CheckTheme extends Action {
	/*
	 * (non-PHPdoc) @see Action::execute()
	 */
	public function execute($params) {
		check_login ( ADMIN_LOGIN_PAGE );
		$typeModel = new WebThemeModel ();
		$where ['name'] = rqst ( 'name' );
		$tid = irqst ( 'tid', 0 );
		if (! empty ( $tid )) { // 修改时
			$where ['theme_id !='] = $tid;
		}
		@header ( 'Content-type: application/json', true );
		echo $typeModel->exist ( $where ) ? 'false' : 'true';
	}
}